bitkeeper revision 1.1159.32.2 (4120c2f7sV0HlymoiDxvLZkiP1uL_Q)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Mon, 16 Aug 2004 14:21:43 +0000 (14:21 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Mon, 16 Aug 2004 14:21:43 +0000 (14:21 +0000)
Simplify start_info_t definition.

linux-2.6.7-xen-sparse/include/asm-xen/hypervisor.h
linux-2.6.7-xen-sparse/include/asm-xen/suspend.h
tools/libxc/xc_linux_build.c
tools/libxc/xc_netbsd_build.c
xen/include/hypervisor-ifs/hypervisor-if.h
xen/include/hypervisor-ifs/io/domain_controller.h

index 5b89913a811ef52234b6c755d53525585e6711e2..cf9369fd85ef15e5a0cfc53e55656d0db257c4ca 100644 (file)
@@ -21,7 +21,7 @@
 /* arch/xen/i386/kernel/setup.c */
 union start_info_union
 {
-    extended_start_info_t start_info;
+    start_info_t start_info;
     char padding[512];
 };
 extern union start_info_union start_info_union;
index 0a9c8e74a9814d40a34a1444de8c37f746dbebfa..937137f0050847754a189d04240cdda3a9f53342 100644 (file)
@@ -12,7 +12,7 @@
 
 typedef struct suspend_record_st {
     /* To be filled in before resume. */
-    extended_start_info_t resume_info;
+    start_info_t resume_info;
     /*
      * The number of a machine frame containing, in sequence, the number of
      * each machine frame that contains PFN -> MFN translation table data.
index 39dd6c3d08f38df39d2aa84fb7f98f71a2bd960c..c272ecb2c216368bc45f0365f01fd383f993a763 100644 (file)
@@ -85,7 +85,7 @@ static int setup_guestos(int xc_handle,
     unsigned long l2tab;
     unsigned long l1tab;
     unsigned long count, i;
-    extended_start_info_t *start_info;
+    start_info_t *start_info;
     shared_info_t *shared_info;
     mmu_t *mmu = NULL;
     void  *pm_handle=NULL;
index 41adfa935a2a4a47a7e9582607b44b046f285f2c..e1137265513e05336afda5176d15c0f66d5231b2 100644 (file)
@@ -73,7 +73,7 @@ static int setup_guestos(int xc_handle,
     unsigned long l1tab;
     unsigned long count, pt_start;
     unsigned long symtab_addr = 0, symtab_len = 0;
-    extended_start_info_t *start_info;
+    start_info_t *start_info;
     shared_info_t *shared_info;
     unsigned long ksize;
     mmu_t *mmu = NULL;
index bbcbc9f50524c60b6c519994c6bf2d3634880a24..1ffbd3773cf534c533125c4e97193007347f63d8 100644 (file)
@@ -2,6 +2,8 @@
  * hypervisor-if.h
  * 
  * Guest OS interface to Xen.
+ * 
+ * Copyright (c) 2004, K A Fraser
  */
 
 #ifndef __HYPERVISOR_IF_H__
@@ -360,47 +362,35 @@ typedef struct shared_info_st
  *     extended by an extra 4MB to ensure this.
  */
 
-/*
- * This is the basic bootstrap information structure as passed by Xen to the
- * initial controller domain. We want this structure to be easily extended by
- * more sophisticated domain builders and controllers, so we make the basic
- * fields of this structure available via a BASIC_START_INFO macro.
- * 
- * Extended version of start_info_t should be defined as:
- *  typedef struct {
- *      BASIC_START_INFO;
- *      <...extra fields...>
- *  } extended_start_info_t;
- */
 #define MAX_CMDLINE 256
-#define BASIC_START_INFO                                                      \
-    /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.     */ \
-    memory_t nr_pages;       /*  0: Total pages allocated to this domain. */  \
-    _MEMORY_PADDING(A);                                                       \
-    memory_t shared_info;    /*  8: MACHINE address of shared info struct.*/  \
-    _MEMORY_PADDING(B);                                                       \
-    u32      flags;          /* 16: SIF_xxx flags.                        */  \
-    u32      __pad;                                                           \
-    /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME).      */ \
-    memory_t pt_base;        /* 24: VIRTUAL address of page directory.    */  \
-    _MEMORY_PADDING(C);                                                       \
-    memory_t nr_pt_frames;   /* 32: Number of bootstrap p.t. frames.      */  \
-    _MEMORY_PADDING(D);                                                       \
-    memory_t mfn_list;       /* 40: VIRTUAL address of page-frame list.   */  \
-    _MEMORY_PADDING(E);                                                       \
-    memory_t mod_start;      /* 48: VIRTUAL address of pre-loaded module. */  \
-    _MEMORY_PADDING(F);                                                       \
-    memory_t mod_len;        /* 56: Size (bytes) of pre-loaded module.    */  \
-    _MEMORY_PADDING(G);                                                       \
-    u8 cmd_line[MAX_CMDLINE] /* 64 */
-
 typedef struct {
-    BASIC_START_INFO;
+    /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.     */
+    memory_t nr_pages;        /*  0: Total pages allocated to this domain. */
+    _MEMORY_PADDING(A);
+    memory_t shared_info;     /*  8: MACHINE address of shared info struct.*/
+    _MEMORY_PADDING(B);
+    u32      flags;           /* 16: SIF_xxx flags.                        */
+    u16      domain_controller_evtchn; /* 20 */
+    u16      __pad;
+    /* THE FOLLOWING ARE ONLY FILLED IN ON INITIAL BOOT (NOT RESUME).      */
+    memory_t pt_base;         /* 24: VIRTUAL address of page directory.    */
+    _MEMORY_PADDING(C);
+    memory_t nr_pt_frames;    /* 32: Number of bootstrap p.t. frames.      */
+    _MEMORY_PADDING(D);
+    memory_t mfn_list;        /* 40: VIRTUAL address of page-frame list.   */
+    _MEMORY_PADDING(E);
+    memory_t mod_start;       /* 48: VIRTUAL address of pre-loaded module. */
+    _MEMORY_PADDING(F);
+    memory_t mod_len;         /* 56: Size (bytes) of pre-loaded module.    */
+    _MEMORY_PADDING(G);
+    u8 cmd_line[MAX_CMDLINE]; /* 64 */
 } PACKED start_info_t; /* 320 bytes */
 
 /* These flags are passed in the 'flags' field of start_info_t. */
 #define SIF_PRIVILEGED    (1<<0)  /* Is the domain privileged? */
 #define SIF_INITDOMAIN    (1<<1)  /* Is this the initial control domain? */
+#define SIF_BLK_BE_DOMAIN (1<<4)  /* Is this a block backend domain? */
+#define SIF_NET_BE_DOMAIN (1<<5)  /* Is this a net backend domain? */
 
 /* For use in guest OSes. */
 extern shared_info_t *HYPERVISOR_shared_info;
index da1f2441de7e5463091630a4f4737c708781fb3d..42eedd945ea55290a5d032f6f9842d8c7932ae7d 100644 (file)
 #define __DOMAIN_CONTROLLER_H__
 
 
-#ifndef BASIC_START_INFO
-#error "Xen header file hypervisor-if.h must already be included here."
-#endif
-
-
-/*
- * EXTENDED BOOTSTRAP STRUCTURE FOR NEW DOMAINS.
- */
-
-typedef struct {
-    BASIC_START_INFO;
-    u16 domain_controller_evtchn; /* 320 */
-} PACKED extended_start_info_t; /* 322 bytes */
-#define SIF_BLK_BE_DOMAIN (1<<4)  /* Is this a block backend domain? */
-#define SIF_NET_BE_DOMAIN (1<<5)  /* Is this a net backend domain? */
-
-
 /*
  * Reason codes for SCHEDOP_shutdown. These are opaque to Xen but may be
  * interpreted by control software to determine the appropriate action. These